<template>
    <div class="menu-left">

        <el-menu :default-active="$route.path" class="el-menu-vertical-demo" style="height: 100%;"
            @select="handleSelect" @open="handleOpen" @close="handleClose" router>
            <el-menu-item v-for="item in props.data" :index="item.path">{{ item.name }}</el-menu-item>

        </el-menu>

    </div>


</template>
<script setup>
const props = defineProps(["data"])
console.log(props.data)
const emit = defineEmits(["select"])
const handleClose = () => {

}
const handleOpen = () => {

}
const handleSelect = (e) => {
    console.log(e)
    emit("select", e)
}
</script>
<style scoped>
.menu-left {

    width: 100%;
    height: 100%;
    background: rgb(10, 85, 166);
}
</style>